




//
//  MBCommonMethod.m
//  房源详情-小区详情
//
//  Created by MB__Lee on 2018/5/28.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBCommonMethod.h"

//------------------租房------------------
#import "MBRecoHouseVC.h" //房源信息

#import "MBFirstShopVC.h" //商铺
#import "MBOffBuilding.h" // 写字楼

//------------------租物品------------------


//------------------租服务------------------


//------------------其他-----------------
#import "MBRecoNewsVC.h" //新闻



@interface MBCommonMethod()

@property(nonatomic,weak)UIViewController *vc;

@end

@implementation MBCommonMethod

+(void)CommonMethod_PresentOriginalViewController:(UIViewController *)original presentViewController:(UIViewController *)present{

    
    [original presentViewController:present animated:YES completion:nil];
    
}
+(void)CommonMethod_PushOriginalViewController:(UIViewController *)original presentViewController:(UIViewController *)present{
    [original.navigationController pushViewController:present animated:YES];
}

#pragma mark ---首页--租房
-(void)CommonMethod_ZuFangPushWithIndexPath:(NSIndexPath *)indexPath viewController:(UIViewController *)vc{
    _vc = vc;
    
    if (indexPath.row == 0) { //租房-- 房源信息
        MBRecoHouseVC *houseVC = [[MBRecoHouseVC alloc] init];
        [vc.navigationController pushViewController:houseVC animated:YES];
    }else if (indexPath.row == 1){  //租房-- 经纪人
        
    }else if(indexPath.row == 2){ //租房-- 商铺
        MBFirstShopVC *shopVC = [[MBFirstShopVC alloc] init];
        [vc.navigationController pushViewController:shopVC animated:YES];
    }else if(indexPath.row == 3){  //租房-- 写字楼
        MBOffBuilding *offBuilding  = [[MBOffBuilding alloc] init];
        [vc.navigationController pushViewController:offBuilding animated:YES];
    }else if(indexPath.row == 4){  //找小区
        
    }else if(indexPath.row == 5){ //地图找房
        
    }else if(indexPath.row == 6){ //求租信息
        
    }else if(indexPath.row == 7) { //委托出租
       
    }
    
    
}
#pragma mark -- 首页-- 租物品
-(void)CommonMethod_ZuWuPinPushWithIndexPath:(NSIndexPath *)indexPath viewController:(UIViewController *)vc{
    _vc = vc;
    
    if (indexPath.row == 0) { // 物品
       
    }else if (indexPath.row == 1){  //家具
        
    }else if(indexPath.row == 2){ //办公用品
        
    }else if(indexPath.row == 3){  //家电
        
    }else if(indexPath.row == 4){  //租车
        
    }else if(indexPath.row == 5){ //婚纱
        
    }else if(indexPath.row == 6){ //数码产品
        
    }else if(indexPath.row == 7) { //工具
        
    }
}
#pragma mark -- 首页-- 租服务
-(void)CommonMethod_ZuFuWuPushWithIndexPath:(NSIndexPath *)indexPath viewController:(UIViewController *)vc{
    _vc = vc;
    
    if (indexPath.row == 0) { // 服务
        
    }else if (indexPath.row == 1){  //搬家
        
    }else if(indexPath.row == 2){ //家政
        
    }else if(indexPath.row == 3){  //育婴
        
    }else if(indexPath.row == 4){  //保姆
        
    }else if(indexPath.row == 5){ //代购
        
    }else if(indexPath.row == 6){ //保洁
        
    }else if(indexPath.row == 7) { //家教
        
    }
}
#pragma mark -- 首页-- 其他
-(void)CommonMethod_OthersPushWithIndexPath:(NSIndexPath *)indexPath viewController:(UIViewController *)vc{
    _vc = vc;
    
    if (indexPath.row == 0) { //新闻
        MBRecoNewsVC *newsVC = [[MBRecoNewsVC alloc] init];
        [vc.navigationController pushViewController:newsVC animated:YES];
        
    }else if (indexPath.row == 1){  //安全保障
        
    }else if(indexPath.row == 2){ //租客之家
        
    }else if(indexPath.row == 3){  //租客公益
        
    }
    
}

@end
